package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.mapper.StrategyCatalogMapper;
import cn.wolfcode.trip.base.mapper.StrategyDetailMapper;
import cn.wolfcode.trip.base.mapper.StrategyMapper;
import cn.wolfcode.trip.base.service.IListKeyService;
import cn.wolfcode.trip.base.service.IStrategyCatalogService;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import cn.wolfcode.trip.base.service.IStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Service
public class ListKeyServiceImpl implements IListKeyService {

    @Autowired
    private StrategyMapper strategyMapper;

    @Autowired
    private StrategyDetailMapper detailMapper;

    @Autowired
    private StrategyCatalogMapper catalogMapper;


    //全部标题
    @Override
    public List<String> listKey() {
        List<String> list = new ArrayList<>();
        List<String> strategyList = strategyMapper.listTitleAndSubTitle();
        List<String> detailList = detailMapper.listTitle();
        List<String> catalogList = catalogMapper.listName();

        list.addAll(strategyList);
        list.addAll(detailList);
        list.addAll(catalogList);
        return list;
    }
}
